package com.nxj.pojo;

import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Pattern;

public class Handler {

    private Object controller;
    private Method method;
    private Pattern pattern;
    private Map<String, Integer> paramIndexMap = new HashMap<>();
    private String[] securitys;

    public Object getController() {
        return controller;
    }

    public void setController(Object controller) {
        this.controller = controller;
    }

    public Method getMethod() {
        return method;
    }

    public void setMethod(Method method) {
        this.method = method;
    }

    public Pattern getPattern() {
        return pattern;
    }

    public void setPattern(Pattern pattern) {
        this.pattern = pattern;
    }

    public Map<String, Integer> getParamIndexMap() {
        return paramIndexMap;
    }

    public void setParamIndexMap(Map<String, Integer> paramIndexMap) {
        this.paramIndexMap = paramIndexMap;
    }

    public String[] getSecuritys() {
        return securitys;
    }

    public void setSecuritys(String[] securitys) {
        this.securitys = securitys;
    }

    @Override
    public String toString() {
        return "Handler{" +
                "controller=" + controller +
                ", method=" + method +
                ", pattern=" + pattern +
                ", paramIndexMap=" + paramIndexMap +
                ", securitys=" + Arrays.toString(securitys) +
                '}';
    }
}
